package com.mycompany.app.common.audit;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * Annotation based audit base object.
 * @author Shawn.guo
 * 
 * suggestion:采用extends abstract class的方式 影响太大, 可以改用hibernate embeded annotation, 
 * AuditBaseObject以embeded obejct的方式存在, 需要track modification的类implements 接口.
 *
 */

@MappedSuperclass
public abstract class AuditBaseObject {

    @Column(name = "create_by")
    protected String createBy;

    @Column(name = "last_modified_by")
    protected String lastModifiedBy;

    @Column(name = "create_date")
    protected Date createDate;

    @Column(name = "last_modified_date")
    protected Date lastModifiedDate;

    public String getCreateBy() {

        return createBy;
    }

    public void setCreateBy(String createBy) {

        this.createBy = createBy;
    }

    public String getLastModifiedBy() {

        return lastModifiedBy;
    }

    public void setLastModifiedBy(String lastModifiedBy) {

        this.lastModifiedBy = lastModifiedBy;
    }

    public Date getCreateDate() {

        return createDate;
    }

    public void setCreateDate(Date createDate) {

        this.createDate = createDate;
    }

    public Date getLastModifiedDate() {

        return lastModifiedDate;
    }

    public void setLastModifiedDate(Date lastModifiedDate) {

        this.lastModifiedDate = lastModifiedDate;
    }
}
